#include <iostream>
using namespace std;
#include <QObject>
#include <QDebug>

class MYobj:public QObject
{
private:
    
public:
    MYobj(QObject *parent=0)
    :QObject(parent)
    {
        cout<<"MYobj"<<endl;
    }
    ~MYobj()
    {
        cout<<"~MYobj"<<endl;
    }
};

int main(int argc,char **argv)
{
    MYobj obj;
    MYobj *obj2 = new MYobj(&obj);
    MYobj *obj3 = new MYobj(&obj);
    MYobj *obj4 = new MYobj(&obj);

    qDebug()<<obj.children();
    return 0;
}
